// recycle 回收站  区块提供者类，用于与区块链交互，提供数据的获取和存储功能。
import { apiAll } from './index'
import { getPageSize } from '@/utils/currency'
import { recycleProvider } from '@/plugins/account.ts'
import { SearchAssetConditionJson } from '@yeying-community/yeying-client-ts/src/yeying/api/asset/asset_pb.ts'

// 搜索回收站资产
export const recycleProviderSearch = (condition?: SearchAssetConditionJson) =>
    apiAll(() => recycleProvider.search(1, getPageSize(), condition ?? {}))

// 永久删除资产
export const recycleProviderRemove = (namespaceId: string, hash: string) =>
    apiAll(() => recycleProvider.remove(namespaceId, hash))

// 恢复删除资产
export const recycleProviderRecover = (namespaceId: string, hash: string) =>
    apiAll(() => recycleProvider.recover(namespaceId, hash))
